<template>
    <div class="assumption-container">
        <ul class="assumption-list">
            <li v-for="(item, index) in assumptions" :key="index" class="assumption-item"
                @mouseenter="hoverIndex = index" @mouseleave="hoverIndex = -1">
                <span class="item-number">{{ index + 1 }}.</span>
                <span class="item-text">{{ item }}</span>
                <div class="hover-indicator" :class="{ 'active': hoverIndex === index }"></div>
            </li>
        </ul>
    </div>
</template>

<script setup>
import { ref } from 'vue';

const assumptions = ref([
    "孤立国假设（Isolated State）",
    "均质地理条件（Uniform Geography）",
    "单一运输方式与成本（Single Transport Cost）",
    "完全竞争市场（Perfect Competition）",
    "固定生产成本（Fixed Production Cost）",
    "农产品特性固定（Fixed Crop Characteristics）",
    "劳动力分布均匀（Uniform Labor Distribution）"
]);

const hoverIndex = ref(-1);
</script>

<style scoped>
.assumption-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    font-family: 'Microsoft YaHei', sans-serif;
}

.assumption-list {
    list-style: none;
    padding: 0;
}

.assumption-item {
    position: relative;
    padding: 0.8rem 1rem;
    margin-bottom: 0.3rem;
    background: rgba(15, 23, 42, 0.7); /* 深蓝色半透明背景 */
    backdrop-filter: blur(8px); /* 毛玻璃效果 */
    border: 1px solid rgba(255, 255, 255, 0.1); /* 浅色边框 */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* 深色阴影 */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
}

.assumption-item:hover {
    transform: translateY(-3px);
    background: rgba(30, 41, 59, 0.8); /* 悬停时加深背景 */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.item-number {
    font-weight: bold;
    color: #60a5fa; /* 亮蓝色数字 */
    margin-right: 0.8rem;
    font-size: 0.9rem;
    min-width: 20px;
    text-shadow: 0 0 5px rgba(96, 165, 250, 0.3); /* 数字发光效果 */
}

.item-text {
    color: #e2e8f0; /* 浅灰色文字 */
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.hover-indicator {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #60a5fa, #3b82f6); /* 蓝色渐变指示条 */
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.hover-indicator.active {
    transform: scaleY(1);
}
</style>